import request from '@/utils/request'

// 查询区域列表
export function listRegion(query) {
  return request({    url: '/erecord/region/list',    method: 'get',    params: query  })
}

// 查询区域详细
export function getRegion(id) {
  return request({    url: '/erecord/region/' + id,    method: 'get'  })
}

// 新增区域
export function addRegion(data) {
  return request({    url: '/erecord/region',    method: 'post',    data: data  })
}

// 修改区域
export function updateRegion(data) {
  return request({    url: '/erecord/region',    method: 'put',    data: data  })
}

// 删除区域
export function delRegion(id) {
  return request({    url: '/erecord/region/' + id,    method: 'delete'  })
}
// export function tree(){
  // return request({    url: '/erecord/region/tree' + id,    method: 'delete'  })

// }

// 查询区域的下拉树结构
export function regionTree() {
  return request({    url: '/erecord/region/tree',    method: 'get'  })
}

